package org.fluidindia.ria.library.remoting
{
	import flash.events.IEventDispatcher;
	
	import mx.controls.Alert;
	import mx.rpc.AsyncToken;
	import mx.rpc.events.FaultEvent;
	import mx.rpc.events.ResultEvent;
	import mx.rpc.remoting.RemoteObject;
	
	import org.fluidindia.ria.library.remoting.DestinationLocator;
	import org.swizframework.utils.services.MockDelegateHelper;
	import org.swizframework.utils.services.ServiceHelper;

	public class FluidBaseService
	{
		private var ro:RemoteObject;

		[Inject]
		public var destinationLocator:DestinationLocator;
		
		[Inject]
		public var sh:ServiceHelper;
		
		
		public function getDestination(destination:String):RemoteObject
		{
			if (ro == null)
			{
				ro = destinationLocator.createDestination(destination);
			}
			
			return ro;
		}
	}
}

